package com.jy.rhin.model.body.jiankangtj;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.model.CodeObject;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 家族史
 * @author shenguangyang
 */
@Data
public class JiaZuS {
    /** 疾病名称 */
//    @XPath(path = "/text/text()", xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE04_10_176_00))
//    String jiBingMC;

    /** 家族史条目 */
    @XPath(path = "/entry/..", listItemPath = "/entry/organizer", listItemBackLevel = 0)
    List<Item> jiaZuSTMList = new ArrayList<>();

    @Data
    public static class Item {
        // 家庭关系
        @XPath(path = "/subject/relatedSubject/code"
                , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_10_024_00))
        CodeObject jiaTingGX;

        // 性别
        @XPath(path = "/subject/relatedSubject/subject/administrativeGenderCode",
                xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_040_00))
        CodeObject xingBie;

        // 家族疾病
        @XPath(path = "/component/..", listItemPath = "/component/observation/value", listItemBackLevel = 0
                , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_10_095_00))
        List<CodeObject> jiaZuJBList = new ArrayList<>();
    }
}
